import { IToolTipItem } from "../../../../com/mui/manager/IToolTipItem";
import { ResouceConst } from "../../../component/gconst/ResouceConst";
import { LoaderManager } from "../../../../com/gengine/resource/LoaderManager";
import { ToolTipsManager } from "../../../../com/mui/manager/ToolTipsManager";
import { ImageInfo } from "../../../../com/gengine/resource/info/ImageInfo";
import { Cache } from "../../cache/Cache";
import { Language } from "../../../../extend/language/Language";
import { HTMLUtil } from "../../../../com/gengine/utils/HTMLUtil";
import { ToolTipInfo } from "../../model/ToolTipInfo";
import { Tooltip } from "../common/tooltip/Tooltip";
type int = number;
//class KillEvilPropItem
    
    export  class KillEvilPropItem /* flash.display.Sprite */ implements IToolTipItem
    {
        constructor(arg1: int)
        {
            
            this._type = arg1;
            var loc1=ResouceConst.getScaleBitmap("PackItemBg");
            loc1.x = x;
            loc1.y = y;
            loc1.width = 71;
            loc1.height = 71;
            this.addChild(loc1);
            LoaderManager.instance.load("KillEvilTaskIcon_" + arg1 + ".png", this.onLoaded);
            ToolTipsManager.register(this);
            return;
        }

        /* internal  */onLoaded(arg1: ImageInfo): void
        {
            var loc1=new Object /* flash.display.Bitmap */(arg1.bitmapData);
            loc1.x = 3;
            loc1.y = 3;
            this.addChild(loc1);
            return;
        }

        public get toolTipData()
        {
            var loc1="";
            var loc2=Cache.instance.killEvilTask.getKillEvilTaskName(this._type);
            loc1 = loc1 + Language.getStringByParam(90160, loc2);
            loc1 = loc1 + HTMLUtil.addColor(Language.getStringByParam(90161, loc2), "#01BA5E");
            loc1 = loc1 + HTMLUtil.addColor(Language.getStringByParam(90162, Cache.instance.killEvilTask.getExpByType(this._type).toString()), "#0391C6");
            loc1 = loc1 + HTMLUtil.addColor(Language.getStringByParam(90163, loc2), "#EB8D01");
            return new ToolTipInfo(Tooltip.ToolTipRenderType_ShortcutItem, loc1);
        }

        public set toolTipData(arg1)
        {
            return;
        }

        /* internal */ /* var */_type: int;
    }
